#region <!--##session EntityIncludes##-->
<!--##
	/*string className=  StringProcessor.Class(entity.Name) + "BO";
    string collectionName=  className + "Collection";
	string entityName=  entity.Name;
	string entityCaption = entity.Caption;
	string entityVariable = StringProcessor.Variable(entity.Name);
	string tableName=entity.TableName; 
	string viewName=entity.ViewName;
	string keySignature=entity.KeySignature;
	string accessorName=entity.AccessorName;
	//Custom fields
	string gridKey=entity.GridKey;
	string gridSortedBy=entity.GridSortedBy;
	
	//Security
	Repository.Security security=Managers.RepositoryManager.Instance.Repository.SecurityRelated;
	string iUserImplement = string.Empty;
	string iUserLoginImplement = string.Empty;
	string iRoleImplement = string.Empty;
	Repository.Security.UserRole userRole=null;
	Repository.Security.UserLogin userLogin=null;
	bool isUserLoginClass= false;
	bool isUserRoleClass= false;
	string userClass=string.Empty; 
	string roleClass=string.Empty;
	string users_rolesClass =string.Empty; 
	string roles_modulesClass =string.Empty;
	
	string userCollection=string.Empty; 
	string roleCollection=string.Empty;
	string users_rolesCollection =string.Empty; 
	string roles_modulesCollection =string.Empty;

	
	if(security != null)
	{
		userLogin = security.UserLoginInfo;
		userRole = security.UserRoleInfo;
		
		userClass = StringProcessor.Class(userLogin.Entity) + "BO";
		roleClass = StringProcessor.Class(userRole.Entity) + "BO"; 
		users_rolesClass = StringProcessor.Class(userLogin.RelatedRolesEntity) + "BO";
		roles_modulesClass = StringProcessor.Class(userRole.relatedModulesEntity) + "BO";
		
		userCollection=userClass + "Collection"; 
		roleCollection=roleClass + "Collection";
		users_rolesCollection =users_rolesClass + "Collection"; 
		roles_modulesCollection =roles_modulesClass + "Collection";


	
		if(security.UserLoginInfo.Entity.ToUpper()== entityName.ToUpper())
		 {
			iUserImplement = ",IUser";
			iUserLoginImplement = ",IUserLogin";
			isUserLoginClass=true;
		 }
		 else if(security.UserRoleInfo.Entity.ToUpper()== entityName.ToUpper())
		 {
			iRoleImplement = ",IRole";
			isUserRoleClass=true;
		 }
	}
	
	 

*/

##-->
<!--##/session##-->
#endregion 

#region <!--##session EntityFieldIncludes##-->
<!--##
	/*string entityFieldCaption = entityField.Caption;
	string property=  StringProcessor.Property(entityField.Name);
	string entityFieldName=  entityField.Name;
	string entityFieldConstant = StringProcessor.ConstantNStatic(entityField.Name);
	string dbParameter = StringProcessor.DBParameter(entityField.Name);
	string entityFieldVariable = StringProcessor.Variable(entityField.Name);
	string tokenId=entityField.TokenId;
	bool autoIncreament=entityField.AutoIncreament;
	bool tokenEnabled=entityField.TokenEnabled;
	bool isNative=entityField.IsNative;
	bool isRange=entityField.IsRange;
	bool isValueType=entityField.IsValueType;
	bool isKey=entityField.IsKey;
	bool isUnique=entityField.IsUnique; 
	string cSharpKeywordDataType=FreeHash.CSharpType[entityField.DataType]; 
	string dataType=entityField.DataType; 
	string cSharpFrameworkDataType=FreeHash.CSharpSystemType[entityField.DataType];
	
	//Custom fields
	string formatString=entityField.FormatString;
	
	string listTable=entityField.ListTable;
	string listTableClassName=StringProcessor.Class(entityField.ListTable) + "BO";
	string listTableCollectionName= listTableClassName + "Collection";
	
	string listTableDisplayFields=entityField.ListTableDisplayFields;
	string listControl=entityField.ListControl;
	string webControl=entityField.WebControl;
	string listTableKeyField=entityField.ListTableKeyField;
	string listTableKeyFieldProperty=StringProcessor.Property(entityField.ListTableKeyField);
	string listTableKeyFieldConstant=StringProcessor.ConstantNStatic(entityField.ListTableKeyField);
	bool usingRange = entityField.UsingRange;
	bool displayed = entityField.Displayed;
	bool usingTime = entityField.UsingTime;
	
	string strIsDecimalNumberAttb = (listTable == string.Empty && (dataType == Constants.UDTypes.SHORT ||
		dataType == Constants.UDTypes.LONG || 
		dataType == Constants.UDTypes.INT ||
		dataType == Constants.UDTypes.BYTE))? "IsDecimalNumber = \"false\"": string.Empty;
		
	string strUsingTimeAttb =(usingTime)? "ShowingTime=\"true\"": string.Empty;
	string strDecimalCast = (isValueType && dataType != Constants.UDTypes.DATE_TIME && dataType != Constants.UDTypes.BIT)?
					"(decimal?)": "";




	*/ 

##-->
<!--##/session##-->
#endregion 

#region <!--##session RefEntityIncludes##-->
<!--##
	/*string refClassName=  StringProcessor.Class(refEntity.Name) + "BO";
    string refCollectionName=  refClassName + "Collection";
	string refEntityName=  refEntity.Name;
	string refEntityCaption = refEntity.Caption;
	string refEntityVariable = StringProcessor.Variable(refEntity.Name);
	string refTableName=refEntity.TableName; 
	string refViewName=refEntity.ViewName;
	string refKeySignature=refEntity.KeySignature;*/

##-->
<!--##/session##-->
#endregion 

#region <!--##session RefEntityFieldIncludes##-->
<!--##
	/*string refEntityFieldCaption = refEntityField.Caption;
	string refProperty=  StringProcessor.Property(refEntityField.Name);
	string refEntityFieldName=  refEntityField.Name;
	string refEntityFieldConstant = StringProcessor.ConstantNStatic(refEntityField.Name);
	string refDbParameter = StringProcessor.DBParameter(refEntityField.Name);
	string refEntityFieldVariable = StringProcessor.Variable(refEntityField.Name);
	string refTokenId=refEntityField.TokenId;
	bool refAutoIncreament=refEntityField.AutoIncreament;
	bool refTokenEnabled=refEntityField.TokenEnabled;
	bool refIsNative=refEntityField.IsNative;
	bool refIsRange=refEntityField.IsRange;
	bool refIsKey=refEntityField.IsKey;
	bool refIsUnique=refEntityField.IsUnique; 
	string refCSharpKeywordDataType=FreeHash.CSharpType[refEntityField.DataType]; 
	string refDataType=refEntityField.DataType; 
	string refCSharpFrameworkDataType=FreeHash.CSharpSystemType[refEntityField.DataType];*/ 

##-->
<!--##/session##-->
#endregion 

#region <!--##session RelationIncludes##-->
<!--##
	/*string parentRelationName =  StringProcessor.RelationName(relation.ReferencedEntity.Name,relation.NativeEntity.Name);
	string childRelationName =  StringProcessor.RelationName(relation.NativeEntity.Name,relation.ReferencedEntity.Name);
	string parentRelationProperty =  StringProcessor.RelationProperty(relation.ReferencedEntity.Name,relation.NativeEntity.Name);
	string childRelationProperty =  StringProcessor.RelationProperty(relation.NativeEntity.Name,relation.ReferencedEntity.Name);
	Entity.Field[] nativeKey =relation.NativeKey;
	Entity.Field[] refKey =relation.ReferencedKey;

	*/
##-->
<!--##/session##-->
#endregion

#region <!--##session TestingOnce##-->
/*<!--##
	foreach(string entityKey in RepositoryManager.Instance.Entities.Keys)
	{
		Entity entity=RepositoryManager.Instance.Entities[entityKey]; 
		<%@EntityIncludes%>
##-->*/
	<!--##=className##-->			
/*<!--##
		foreach(string entityFieldKey in entity.Fields.Keys)
		{
			Entity.Field entityField = entity.Fields[entityFieldKey]; 
			<%@EntityFieldIncludes%>
##-->*/
		    <!--##=property##-->
/*<!--##
		}  		
	}
##-->*/
<!--##/session##-->
#endregion 

#region <!--##session TestingTable##-->
/*<!--##
	Entity entity = 
		RepositoryManager.Instance.ActiveEntity;
	<%@EntityIncludes%>
##-->*/
	<!--##=className##-->			
/*<!--##
	foreach(string entityFieldKey in entity.Fields.Keys)
	{
		Entity.Field entityField = entity.Fields[entityFieldKey];
		<%@EntityFieldIncludes%>
##-->*/
	<!--##=property##-->
/*<!--##
	}
##-->*/
<!--##/session##-->
#endregion 

#region <!--##session GeneralUsing##-->
/** 
Copyright (c) 2010, Sheikh Abdul Wahid Ahmed
Details @ http://extremecodeworld.codeplex.com/license
Code generated by eXtremecode Generator
**/

using System;
using EXtremecode;
using EXtremecode.BusinessLayer;
using EXtremecode.DataAccessLayer;
using EXtremecode.Utils;
using EXtremecode.Common; 
using EXtremecode.Common.Security;
using EXtremecode.Logging;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Text;
/*<!--##
foreach(string accessorName in RepositoryManager.Instance.Entities.Accessors)
{
##-->*/
using <!--##=RepositoryManager.Instance.Repository.ProjectName##-->.BusinessObjects.<!--##=accessorName##-->;
using <!--##=RepositoryManager.Instance.Repository.ProjectName##-->.DataTables.<!--##=accessorName##-->;
/*<!--##
}
##-->*/

<!--##/session##-->
#endregion

